<?php
// +------------------------------------------------------------------
// | Cls-Token [ USER LOGIN AUTHENTICATION TOKEN ]
// | Copyright (c) 2024 All rights reserved.
// | Based on ThinkPHP 6 | 8
// | Licensed Mulan PSL v2 ( http://license.coscl.org.cn/MulanPSL2 )
// | Author: CLS <422064377>
// | CreateDate: 2024-07-15
// +------------------------------------------------------------------

declare (strict_types = 1);

namespace chleniang\ClsToken\facade;

use think\Facade;


/**
 * @see     \chleniang\ClsToken\Token
 *
 * @package chleniang\facade
 *
 * @method static array buildToken(int|string $userIdentifier, array $userExInfo = [], string|null $storeKey = null) 生成Token; 登录成功后生成token记录;
* 含token及refresh_token(如果有的话)
 * @method static array updateToken(string $refreshToken, int|string $userIdentifier, string|null $storeKey = null) 通过 refresh_token 及 用户标识 更新 token
 * @method static bool check(string $token, int|string $userIdentifier, string $checkType = "access(默认)/refresh",string|null $storeKey = null) 验证token有效性; 校验通过返回true,否则抛出异常
 * @method static array get(int|string $userIdentifier,string|null $storeKey = null) 获取指定用户标识的token记录; 没有记录返回空数组;
 * @method static bool delete(int|string $userIdentifier,string|null $storeKey = null) 删除指定用户标识的token记录;
 * @method static string|null getDefaultDriver() 获取默认存储驱动标识
 * @method static mixed getConfig(string|null $name = null, mixed $default = null) 获取配置(不指定配置项名称则获取所有配置)
 * @method static \chleniang\ClsToken\Driver store(string|null $storeKey = null) 获取或者切换存储驱动
 */
class Token extends Facade
{
    protected static function getFacadeClass(): string
    {
        return \chleniang\ClsToken\Token::class;
    }

}